package com.tianlh.service.design_pattern.Chain_of_Responsibility;

/**
 * Created by wb-tianlihui on 2017/11/15.
 */
public class Main {
    public static void main(String[] args) {
        //初始化
        Client client = new Client(6);
        ManageHandler h1 = new ManageHandler();
        DeptManageHanler h2 = new DeptManageHanler();
        PersonnelHanler h3 = new PersonnelHanler();

        //定义责任链处理规则
        h1.setHandler(h2);
        h2.setHandler(h3);

        //执行操作
        h1.operator(client);
    }
}
